// import React from 'react';
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import './index.css'

import * as serviceWorker from './serviceWorker';
import {Route,BrowserRouter,Switch} from 'react-router-dom'

/**
 * 首页
 */
import Home from "./pages/Home/Home";
import TopList from "./pages/TopList/TopList";
import Cmd from "./pages/Cmd/Cmd";
import My from "./pages/My/My";
import Friend from "./pages/Friend/Friend";
import Store from "./pages/Store/Store";
import Musician from "./pages/Musician/Musician";
import PlayList from "./pages/PlayList/PlayList";
import DjRadio from "./pages/DjRadio/DjRadio";
import Artist from "./pages/Artist/Artist";
import Album from "./pages/Album/Album";


class App extends Component {
    render() {
        return (
            <BrowserRouter>
                <Switch>
                    {/*<Route exact path='/' component={ Home }/>*/}
                    <Home  path='/home'>
                        <Route exact path='/home' component={ Cmd }/>
                        <Route path='/home/toplist' component={ TopList }/>
                        <Route path='/home/djradio' component={ DjRadio }/>
                        <Route path='/home/playlist' component={ PlayList }/>
                        <Route path='/home/artist' component={ Artist }/>
                        <Route path='/home/album' component={ Album }/>
                    </Home>
                    <Route exact path='/my' component={ My }/>
                    <Route exact path='/friend' component={ Friend }/>
                    <Route exact path='/store' component={ Store }/>
                    <Route exact path='/musician' component={ Musician }/>

                </Switch>
            </BrowserRouter>
        );
    }
}

export default App;



ReactDOM.render(<App />, document.getElementById('root'));

serviceWorker.unregister();
